package com.hnzbxy.api.biz.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 部门信息实体类
 * 对应数据库表：department
 */
@Data
@Table(name = "department")
@ApiModel(value = "Department", description = "部门信息实体类")
public class Department {

    @Id
    @ApiModelProperty(value = "部门ID（唯一标识）", example = "1")
    private Long id;

    @ApiModelProperty(value = "部门编码（如：HR-001、IT-002）", required = true, example = "HR-001")
    private String deptCode;

    @ApiModelProperty(value = "部门名称", required = true, example = "人力资源部")
    private String deptName;

    @ApiModelProperty(value = "部门简称", example = "人事部")
    private String deptAbbr;

    @ApiModelProperty(value = "上级部门ID", example = "0")
    private Long parentDeptId;

    @ApiModelProperty(value = "部门负责人员工ID", example = "1001")
    private Long leaderEmpId;

    @ApiModelProperty(value = "部门状态：0-未启用，1-正常，2-暂停，3-撤销", 
                      required = true, 
                      example = "1",
                      allowableValues = "0,1,2,3")
    private Integer deptStatus;

    @ApiModelProperty(value = "部门成立日期", example = "2023-01-01")
    private Date establishDate;

    @ApiModelProperty(value = "部门撤销日期（仅状态为3时填写）", example = "2024-01-01")
    private Date dissolveDate;

    @ApiModelProperty(value = "创建人ID", required = true, example = "1000")
    private Long creatorId;

    @ApiModelProperty(value = "创建时间（自动填充）", example = "2023-01-01 10:00:00")
    private Date createTime;

    @ApiModelProperty(value = "最后更新人ID", example = "1000")
    private Long updaterId;

    @ApiModelProperty(value = "最后更新时间（自动更新）", example = "2023-01-02 15:30:00")
    private Date updateTime;

    @ApiModelProperty(value = "备注信息", example = "负责公司人力资源管理")
    private String remark;
}
